from selenium.webdriver.common.by import By

from base import Base


class Page(Base):
    def sousuo(self):
        loc=(By.XPATH,'//android.widget.TextView[@text="搜索菜谱"]')
        ele=self.find_ele(loc)
        return ele
    def shuru(self):
        loc=(By.CLASS_NAME,'android.widget.EditText')
        ele=self.find_ele(loc)
        return ele
    def dianji(self):
        loc=(By.ANDROID_UIAUTOMATOR,'new UiSelector().text("搜索")')
        ele=self.find_ele(loc)
        return ele
    def fanhui(self):
        loc=(By.ACCESSIBILITY_ID,'返回')
        ele=self.find_ele(loc)
        return ele